/*
	本js 只用于控制表现层,与业务无关
*/
Package("com.green.web.general");
com.green.web.general = {
	getWindowHight: function(){
		var height=$(window).height();
		return height;
	},
	showTips:function(obj,tipContent){
		var obj=$(obj);
		shihua.common.general.getObjBoxInf(obj);
		var content= tipContent;
		 var html='<div class="bubbleTips" style="top:'+ targetTop+'px; left:'+targetLeft+'px"><div class="arrow" style="left:20px"></div><div class="tipsCont"><div class="cont">'+content+'</div></div></div>'; 
		$(html).appendTo('body');
		//alert(content)
	},
	getObjBoxInf:function(obj){
		 oH=obj.height();
		 oW=obj.width();
		 oTop=obj.offset().top;
		 oLeft=obj.offset().left;
		 targetTop= oTop + oH ;
		 targetLeft= oLeft;
	},
	
	/*
	btnLoading:把点击的部分变成loading,author by Ali
	@param obj 点击的对象
	@param action 动作,创建start 或移除remove
	 */
	btnLoading:function(obj,action){
		var obj = $(obj)
		if(action=="start"){  
			var btnH=obj.outerHeight();
			var btnW=obj.outerWidth();
			var btnTop=obj.offset().top;
			var btnLeft=obj.offset().left;
			var loadingHtml="<div class='btnloading' style='height:"+btnH+"px;width:"+btnW+"px;top:"+btnTop+"px;left:"+btnLeft+"px' id='btnLoading'></div>";
			$(loadingHtml).appendTo('body');
			 
		}else{
			$('#btnLoading').remove()
		}
		 
	},
	
	/*切换显示*/
	switchDisplay:function(targetObj){
		var targetObj=$(targetObj);
		targetObj.toggle()
	}


	
}


 




